package com.example.gateway.consistency;

import java.net.SocketAddress;
import java.util.List;
import java.util.TreeMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public class HashLoop {

    /**
     * 使用读写锁  读写分离
     */
    private final TreeMap<Integer, NodesInfo> hashLoopMap = new TreeMap<>();

    private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock();

    private final Lock readLock = readWriteLock.readLock();

    private final Lock writeLock = readWriteLock.writeLock();

    private static class NodesInfo {

        private SocketAddress serverAddr;


    }


}
